A method and a device for generating a morphing animation from multiple images have been widely applied currently. A general method for a morphing animation is that, on the basis of achieving image warp, first two images are warped in two directions respectively. The two images are referred to as a source image and a destination image respectively according to a playing time sequence, and warp in two directions includes two kinds of warp: warp from a source image to a destination image and warp from a destination image to a source image. Image gray scale fusion is performed on the two warped images to generate a series of intermediate images, thereby achieving smooth morphing of the images. Therefore, the quality and relevant features of an image warping technology are key factors that affect image morphing.
Currently, the image warping technology has already been widely applied in visual effects and advertising design. After extensive and thorough research on the image warping technology, a series of methods that focus spatial mapping are formed. In image warping, spatial mapping is the core, and according to this, the image warping technology may be generally categorized into three types:
(1) Block-based image warping. A typical algorithm includes a 2-step mesh image warping algorithm and a triangulation-based warping algorithm. Their common concept is to divide a whole image into several blocks and then combine warp of every small block to achieve warp of the whole image. An distinctive advantage of this type of algorithms is that warping speed is high. However, preprocessing work of dividing the image into small blocks is troublesome, and the reasonably and effectiveness of block division directly affect a final warping effect.
(2) Line-based warping. A concept of this algorithm is to build a series of feature lines on an image, and an offset of each pixel on the image is determined jointly by distances between the pixel and these feature lines. This method still has a problem that warping speed is low, and is not intuitive enough.
(3) Point-based warping. A typical algorithm is a warping algorithm based on a radial basis function. A basic concept of this algorithm is to regard an image as a formation of multiple scattered points. A spatial mapping of all points on the image is achieved through a spatial mapping of some designated special points and a certain proper radial basis function. Such an algorithm is relatively intuitive. However, because the radial basis function is usually a complicated function such as a Gaussian function, warping speed is quite low. In addition, such an algorithm can hardly ensure a stable border of a warped image.
People have a higher and higher demand for an animation morphing effect, but with a current image warping technology, achieved morphing quality of a morphing animation generated from multiple images is not easily controllable and needs to be further improved.